﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace WPNextTools.NHelper
{
    public class ColorHelper
    {
        public static SolidColorBrush TranslateColor(string hexColorStr)
        {
            byte a = System.Convert.ToByte(hexColorStr.Substring(0, 2), 16);
            byte r = System.Convert.ToByte(hexColorStr.Substring(2, 2), 16);
            byte g = System.Convert.ToByte(hexColorStr.Substring(4, 2), 16);
            byte b = System.Convert.ToByte(hexColorStr.Substring(6, 2), 16);
            Color s = Color.FromArgb(a, r, g, b);
            return new SolidColorBrush(s);
        }
    }
}
